home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / Developer University / DUProjects / GraphicsBfr / Sources / Frame.h < prev    next >
Encoding:
Text File  |  1996-03-26  |  2.7 KB  |  73 lines  |  [TEXT/CWIE]

  1. //    Copyright © 1995-96 Apple Computer, Inc. All rights reserved.
  2. //    Release Version:    $ ODF 1 $
  3.  
  4. #ifndef FRAME_H
  5. #define FRAME_H
  6.  
  7. //=======================================================================
  8. // ----- Framework Includes -----
  9. #ifndef FWFRAME_H
  10. #include <FWFrame.h>        // FW_CFrame
  11. #endif
  12.  
  13. //=======================================================================
  14. class CGraphicsBfrPart;
  15. class CGraphicsBfrPart;
  16. class FW_CLineShape;
  17. class FW_CRegionShape;
  18. class FW_CPolygonShape;
  19. class FW_CPrintHandler;
  20. class FW_CBitmap;
  21.  
  22. //=======================================================================
  23. class CGraphicsBfrFrame : public FW_CFrame {
  24. public:
  25.     FW_DECLARE_AUTO(CGraphicsBfrFrame)
  26.                         CGraphicsBfrFrame(Environment* ev, 
  27.                                     ODFrame* odFrame, 
  28.                                     FW_CPresentation* presentation, 
  29.                                     CGraphicsBfrPart* graphicsbfrPart);
  30.     virtual             ~CGraphicsBfrFrame();
  31. protected:
  32. // overrides
  33.     virtual void        Draw(Environment *ev, 
  34.                                  ODFacet* odFacet, 
  35.                                  ODShape* invalidShape);
  36.     virtual FW_Boolean     DoMouseDown(Environment* ev, 
  37.                                     const FW_CMouseEvent& theMouseEvent);
  38.     virtual void        FrameShapeChanged(Environment* ev);
  39. // overrides printing
  40.     virtual FW_CPrintHandler*    NewPrintHandler(Environment* ev);
  41.     virtual    FW_Boolean            IsCurrentlyPrintable(Environment* ev) const;
  42.     virtual void                GetPrintContentExtent(Environment *ev, FW_CPoint& extent) const;
  43. // new members
  44.     virtual FW_CPictureShape*     MyCreatePictureShape(Environment* ev);
  45.     virtual FW_CPolygonShape*     MyCreatePolygonShape(Environment* ev);
  46.     virtual FW_CLineShape*         MyCreateLineShape(Environment* ev);
  47.     virtual FW_CRegionShape*     MyCreateRegionShape(Environment* ev);
  48.     virtual void         MyDrawBackground(Environment* ev, FW_CGraphicContext& gc);
  49.     virtual void         MyDrawShapes(Environment* ev, FW_CGraphicContext& gc);
  50.     virtual void         MyDrawText(Environment* ev, FW_CGraphicContext& gc);
  51.     virtual void         MyDrawPictures(Environment* ev, FW_CGraphicContext& gc);
  52.     virtual void         MyDrawLine(Environment* ev, FW_CGraphicContext& gc);
  53.     virtual void         MyDrawPolygon(Environment* ev, FW_CGraphicContext& gc);
  54.     virtual void         MyInvalidateLine(Environment* ev);
  55. // for offscreen buffer
  56.     virtual void         MyDrawAllStuff(Environment* ev, FW_CGraphicContext& gc);
  57.     virtual void         MyUpdateBitmap(Environment* ev);
  58.     virtual void         MyDrawToBitmap(Environment* ev, ODShape* invalidShape);
  59. private:
  60.     FW_CPictureShape*    fLargePictureShape;
  61.     FW_CLineShape*        fLineShape;
  62.     FW_CRegionShape*    fRegionShape;
  63.     FW_CPolygonShape*    fPolygonShape;
  64.     FW_CRect            fLargePictRect;
  65.     FW_CBitmap            fBitmap;
  66.     FW_CRect            fFrameRect;
  67.     FW_CBitmapShape*    fBitmapShape;
  68.     FW_Boolean            fDisplayChanged;
  69. };
  70.  
  71. //=======================================================================
  72. #endif
  73.